import 'package:lcapp/data/lc_video_data_entity.dart';
import 'package:lcapp/data/user_data_entity.dart';
import 'package:lcapp/data/xian_huo_data_entity.dart';

lcVideoDataEntityFromJson(LcVideoDataEntity data, Map<String, dynamic> json) {
	if (json['id'] != null) {
		data.id = json['id'] is String
				? int.tryParse(json['id'])
				: json['id'].toInt();
	}
	if (json['userId'] != null) {
		data.userId = json['userId'] is String
				? int.tryParse(json['userId'])
				: json['userId'].toInt();
	}
	if (json['goodsId'] != null) {
		data.goodsId = json['goodsId'] is String
				? int.tryParse(json['goodsId'])
				: json['goodsId'].toInt();
	}
	if (json['videoDesc'] != null) {
		data.videoDesc = json['videoDesc'].toString();
	}
	if (json['coverPath'] != null) {
		data.coverPath = json['coverPath'].toString();
	}
	if (json['videoUrl'] != null) {
		data.videoUrl = json['videoUrl'].toString();
	}
	if (json['playCount'] != null) {
		data.playCount = json['playCount'] is String
				? int.tryParse(json['playCount'])
				: json['playCount'].toInt();
	}
	if (json['likeCounts'] != null) {
		data.likeCounts = json['likeCounts'] is String
				? int.tryParse(json['likeCounts'])
				: json['likeCounts'].toInt();
	}
	if (json['duration'] != null) {
		data.duration = json['duration'] is String
				? int.tryParse(json['duration'])
				: json['duration'].toInt();
	}
	if (json['comment'] != null) {
		data.comment = json['comment'] is String
				? int.tryParse(json['comment'])
				: json['comment'].toInt();
	}
	if (json['share'] != null) {
		data.share = json['share'] is String
				? int.tryParse(json['share'])
				: json['share'].toInt();
	}
	if (json['attentionState'] != null) {
		data.attentionState = json['attentionState'] is String
				? int.tryParse(json['attentionState'])
				: json['attentionState'].toInt();
	}
	if (json['img'] != null) {
		data.img = json['img'].toString();
	}
	if (json['goodsName'] != null) {
		data.goodsName = json['goodsName'].toString();
	}
	if (json['goodsImage'] != null) {
		data.goodsImage = json['goodsImage'].toString();
	}
	if (json['production'] != null) {
		data.production = json['production'].toString();
	}
	if (json['address'] != null) {
		data.address = json['address'].toString();
	}
	if (json['likeState'] != null) {
		data.likeState = json['likeState'] is String
				? int.tryParse(json['likeState'])
				: json['likeState'].toInt();
	}
	if (json['userName'] != null) {
		data.userName = json['userName'].toString();
	}
	if (json['publishType'] != null) {
		data.publishType = json['publishType'] is String
				? int.tryParse(json['publishType'])
				: json['publishType'].toInt();
	}
	return data;
}

Map<String, dynamic> lcVideoDataEntityToJson(LcVideoDataEntity entity) {
	final Map<String, dynamic> data = new Map<String, dynamic>();
	data['id'] = entity.id;
	data['userId'] = entity.userId;
	data['goodsId'] = entity.goodsId;
	data['videoDesc'] = entity.videoDesc;
	data['coverPath'] = entity.coverPath;
	data['videoUrl'] = entity.videoUrl;
	data['playCount'] = entity.playCount;
	data['likeCounts'] = entity.likeCounts;
	data['duration'] = entity.duration;
	data['comment'] = entity.comment;
	data['share'] = entity.share;
	data['attentionState'] = entity.attentionState;
	data['img'] = entity.img;
	data['goodsName'] = entity.goodsName;
	data['goodsImage'] = entity.goodsImage;
	data['production'] = entity.production;
	data['address'] = entity.address;
	data['likeState'] = entity.likeState;
	data['userName'] = entity.userName;
	data['publishType'] = entity.publishType;
	return data;
}